<template>
  <div class="co">
    <div class="bt" >{{data.title}}</div>
    <div class="time" >{{data.createTime}}</div>
    <p class="con" v-html="data.message" ></p>
    <button class="all" @click="quanbu()">全部</button>
  </div>
</template>

<script>
export default {
  name: 'HelloWorld',
  data () {
    return {
       data:[],
       noticeId:"",
     }
  },
  methods:{
    quanbu(){
      this.$router.push({name:'main'})
      
    }
  },
  mounted() {
    this.noticeId=this.$route.query.noticeId;
    console.log(this.$route.query.noticeId)
   this.axios({ 
     method:'get',
     url:`https://test.yintu168.com:8866/notice/public/detail.do?noticeId=${this.noticeId}`,
   })
       .then(response=>{
        console.log(response)
         if(response.data.success==1){
           this.data=response.data.data;
          //  this.noticeId=response.data.data.noticeId; 
         
         }else{
           alert("请求失败")
         }
         
       })
    }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
h1, h2 {
  font-weight: normal;
}
ul {
  list-style-type: none;
  padding: 0;
}
li {
  display: inline-block;
  margin: 0 10px;
}
a {
  color: #42b983;
}
.co{
  width: 100%;
  height: 100%;
  position: relative
}
.bt{
  width: 80%;
  height: 20%;
  margin-left: 9%;
  border: 1px solid red;
}
.time{
  width: 80%;
  height:20%;
  margin-left: 9%;
  border: 1px solid red;
}
.con{
  width: 80%;
  height:40%;
  margin-left: 9%;
  border: 1px solid red;
}
.all{
  width: 100%;
  height: 100px;
  font-size: 24px;
  background: blue;
  color: #fff;
  margin:0 auto;
 position:fixed;
 left:0;
 right:0;
 bottom:0;
  text-align: center;
  line-height: 100px;
}
</style>
